﻿using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using BaseObj;
using System.Web.Script.Services;
using Newtonsoft.Json;

/// <summary>
/// DataForAjax 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class DataForAjax : System.Web.Services.WebService
{

    public DataForAjax()
    {
        //如果使用设计的组件，请取消注释以下行 
        //InitializeComponent(); 
    }

    [WebMethod]
    public string HelloWorld()
    {
        return "Hello World";
    }

    [WebMethod]
    public string GetDictItemByPId(string parentId)
    {
        if (parentId != "")
        {
            return JavaScriptConvert.SerializeObject(DictItem.GetItems(parentId));
        }
        return null;
    }

    [WebMethod]
    public string test(string strTest)
    {
        return "参数：" + strTest;
    }

}

